package com.exp.service;

import com.exp.dao.TopMapper;
import com.exp.dao.more.MoreTopMapper;
import com.exp.model.Top;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

/**
 Created by guojianyu on 2016/1/24.
 */
@Service
@Transactional
public class TopService {
 @Autowired
 private MoreTopMapper moreTopMapper;
 @Autowired
 private TopMapper topMapper;
 public List<Top> getList(Map<String, Object> params) {
  return moreTopMapper.getList(params);
 }
 public int delete(Integer id){
  return  topMapper.deleteByPrimaryKey(id);
 }
 public int add(Top top){
  return  topMapper.insertSelective(top);
 }
 public int update(Top top){
  return  topMapper.updateByPrimaryKeySelective(top);
 }
}
